<template>
  <div class="test">
    <Button type="primary" size="large" @click="onCreate">测试按钮</Button>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from 'nuxt-property-decorator'
import { mapState } from 'vuex'
import { Button } from 'ant-design-vue'
import { createNToken,supply } from "@/utils/create-demo";

export default Vue.extend({
  components: {
    Button
  },
  data() {
    return {
      step: 0,
    }
  },
  computed: {
    ...mapState(['wallet'])
  },
  methods: {
    onCreate() {
      supply(this.$web3,this.$wallet).then((txid)=>{
        const description = 'Supply success'
        this.$accessor.transaction.sub({ txid, description })
      });
    },
  }
})
</script>
